package com.xingmang.db.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
* <p>
    * 
    * </p>
* @author hss
* @since 2023-06-17
*/
@Data
@TableName("tb_sys_log")
@ApiModel(value = "SysLog对象", description = "")
public class SysLog implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("页面名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("日志模块:登录/退出/基础维护/系统管理/订单管理/结算管理")
    @TableField("module")
    private String module;

    @ApiModelProperty("insert/update/delete/login/logout")
    @TableField("type")
    private String type;

    @ApiModelProperty("方法名称")
    @TableField("method")
    private String method;

    @ApiModelProperty("用户ID")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty("请求IP")
    @TableField("ip")
    private String ip;

    @ApiModelProperty("请求参数")
    @TableField("parameter")
    private String parameter;

    @ApiModelProperty("响应时长")
    @TableField("response_time")
    private String responseTime;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty("是否删除")
    @TableField("is_deleted")
    @TableLogic
    private Boolean isDeleted;

}
